<?php

namespace app\common\model;

use think\Model;

/**
 * em_order_logistics_log 
 * @property integer $id (主键)
 * @property integer $order_id 
 * @property string $message 
 * @property string $create_time
 */
class OrderLogisticsLog extends Model
{
    /**
     * The connection name for the model.
     *
     * @var string|null
     */
    protected $connection = 'mysql';
    
    /**
     * The table associated with the model.
     *
     * @var string
     */
    protected $table = 'em_order_logistics_log';

    /**
     * The primary key associated with the table.
     *
     * @var string
     */
    protected $pk = 'id';
    
    
    public static function setlog(int $orderId = 0, string $message = ""): Model
    {
        return self::create([
            'order_id' => $orderId,
            'message' => $message,
            'create_time' => date('Y-m-d H:i:s')
        ]);
    }
    
}
